home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / mem.man < prev    next >
Encoding:
Text File  |  1989-04-14  |  2.7 KB  |  135 lines

  1.  
  2.  
  3.  
  4. mem                   C Library Procedures                    mem
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NNAAMMEE
  11.      memchr, memcmp, memcpy, memset - Operations on byte arrays
  12.  
  13. SSYYNNOOPPSSIISS
  14.      ##iinncclluuddee <<ssttrriinngg..hh>>
  15.  
  16.      cchhaarr **
  17.      mmeemmcchhrr((_s,, _c,, _n))
  18.  
  19.      iinntt
  20.      mmeemmccmmpp((_s,, _s_2,, _n))
  21.  
  22.      cchhaarr **
  23.      mmeemmccppyy((_d_e_s_t,, _s_o_u_r_c_e,, _n))
  24.  
  25.      cchhaarr **
  26.      mmeemmsseett((_d_e_s_t,, _c,, _n))
  27.  
  28. AARRGGUUMMEENNTTSS
  29.      char   *_s       (in)      Pointer to array of characters.
  30.  
  31.      char   *_s_o_u_r_c_e  (in)      Pointer to array of characters  to
  32.                                copy.
  33.  
  34.      char   *_d_e_s_t    (out)     Pointer to array of characters  to
  35.                                modify.
  36.  
  37.      int    _c        (in)      Value to search for  (mmeemmcchhrr),  or
  38.                                value to set to (mmeemmsseett).
  39.  
  40.      int    _n        (in)      Count of number of  characters  to
  41.                                test, copy, or set.
  42.  
  43. _________________________________________________________________
  44.  
  45.  
  46. DDEESSCCRRIIPPTTIIOONN
  47.      These procedures manipulate  memory  as  counted  arrays  of
  48.      bytes.
  49.  
  50.      The mmeemmcchhrr procedure searches for the first occurrence of  _c
  51.      in the _n bytes starting at _s, and returns the address of the
  52.      first such occurrence.  If the value _c is  not  found,  then
  53.      NNUULLLL is returned.
  54.  
  55.      MMeemmccmmpp compares two arrays of bytes, _s  and  _s_2,  in  order,
  56.      until  a  difference is found or _n bytes have been compared.
  57.      It returns a value  greater  than  zero  if,  in  the  first
  58.      differing byte, the value _s is greater than the value in _s_2.
  59.      If the value in _s is less than the value in _s_2, then a value
  60.      less than zero is returned.  If the two arrays are identical
  61.      in their first _n  bytes,  then  zero  is  returned.   Signed
  62.  
  63.  
  64.  
  65. Sprite v.1.0        Printed:  April 14, 1989                    1
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. mem                   C Library Procedures                    mem
  73.  
  74.  
  75.  
  76.      character comparison is used.
  77.  
  78.      MMeemmccppyy copies _n bytes from _s_o_u_r_c_e to _d_e_s_t and  returns  _d_e_s_t
  79.      as its result.
  80.  
  81.      MMeemmsseett stores the value _c in each of the _n bytes starting at
  82.      _d_e_s_t, and returns _d_e_s_t as its result.
  83.  
  84.  
  85. KKEEYYWWOORRDDSS
  86.      characters, copy, memory, set, test
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131. Sprite v.1.0        Printed:  April 14, 1989                    2
  132.  
  133.  
  134.  
  135.